package com.atguigu.spzx.manager.mapper;

import com.atguigu.spzx.model.dto.product.ProductDto;
import com.atguigu.spzx.model.dto.product.ProductSaveDto;
import com.atguigu.spzx.model.entity.product.Product;
import com.atguigu.spzx.model.vo.product.ProductVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper {
    List<ProductVo> findByCondition(ProductDto productDto);

    void save(Product product);

    ProductSaveDto getProductSaveDtoById(Long id);

    void updateById(Product product);

    void deleteById(Long id);

    void updateAuditStatus(@Param("id") Long id, @Param("auditStatus") Integer auditStatus);

    void updateStatus(@Param("id") Long id, @Param("status")Integer status);
}
